package com.android.client.view.panel;

import com.android.client.GreetingService;
import com.android.client.GreetingServiceAsync;
import com.android.client.presenter.GroupSavePsenter;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.TextBox;

public class GroupEditorPanel extends HorizontalPanel {
	private TextBox numText;
	private ListBox selector;
	private Button submit;
	private final GreetingServiceAsync greetingService = GWT
			.create(GreetingService.class);

	public GroupEditorPanel(HandlerManager eventBus) {
		numText = new TextBox();
		numText.setWidth("250px");
		selector = new ListBox();
		selector.addItem("admin", "1");
		selector.addItem("user", "2");
		submit = new Button("OK");
		add(numText);
		add(selector);
		add(submit);
		new GroupSavePsenter(this, eventBus, greetingService);
	}

	public TextBox getNumText() {
		return numText;
	}

	public ListBox getSelector() {
		return selector;
	}

	public Button getSubmit() {
		return submit;
	}

}
